Mysql useful commands

Here will be some commands and their examples with explanations. create DB: CREATE DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci; show db collection and charset: USE db_name; SELECT @@character_set_database, @@collation_database; create user: CREATE USER ‘jeffrey’@’localhost’ IDENTIFIED BY ‘mypass’; grant permissions to some db: GRANT ALL PRIVILEGES ON ‘DB_name’.* TO ‘monty’@’localhost’; show processlist (who’s connected and … Continue reading Mysql useful commands